

function addSensorbitCod(Blockly) {




   //旋转电位器
  Blockly.Python.microbit_resistance = function(block) {
    var dropdown_resistance = this.getFieldValue('resistance');
    Blockly.Python.definitions_['import_microbit'] = 'from microbit import *\n';
    Blockly.Python.definitions_['import_Rotarypotentiometer'] = 'from input import potentiometer\n';
    var code = 'potentiometer.rotary_value('+ dropdown_resistance +')';
    return [code];
  }

    return Blockly;
}

module.exports = addSensorbitCod;

